package example.demo.service;

import demo.rao.mideng.annotation.RaoMiDeng;
import example.demo.aop.LogAnno;
import example.demo.entity.User;
import example.demo.mapper.UserMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class UserService {
    @Resource
    UserMapper userMapper;


    @RaoMiDeng
    @Transactional(rollbackFor = Exception.class)
    public int insertOne(User user) {
        return userMapper.insert(user);
    }
}
